/**
 * Copyright (C) 2020 Baidu, Inc. All Rights Reserved.
 */
package com.baidu.mpks.dal.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * @author cuixuefei
 *
 */
@Data
public class Source {

    public static final Integer TOBUILD = 20;
    public static final Integer SUCCESS = 50;
    public static final Integer ERROR = 90;

    private Integer id;
    @Length(min = 1, max = 50, message = "名称不能超过50个字符")
    private String name;
    private Integer flag;
    private String contentType;
    private String inputType;
    private Integer finishFlag;
    private String mappings;
    private String sqlfileName;
    private Integer nodeId;
    private String nodeName;
    private Integer total;
    private String content;
    // 默认创建状态是成功50，创建中20/创建成功50/创建失败90
    private Integer status = SUCCESS;

    private String createBy;
    private String updateBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    private String trueName;
    private String errMsg;
}
